<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件</title>
    <script src="./lib/jquery-3.6.0.js"></script>
    <style>
        #cav{
            width: 400px;
            height: 400px;
            background-color: whitesmoke;
            border: 1px solid red;
        }
    </style>
</head>
<body>
<!--获取鼠标移动轨迹-->
mouse：<span id="move"></span>
<div id="cav">

</div>

<script type="text/javascript">
    //网页加载完毕后，再进行事件操作
    "use strict";
    $(function () {
        $("#cav").mousemove(function (e) {
            console.log(e);
            $("#move").text("x:" + e.pageX + ";y:" + e.pageY)
        })
    });

</script>
</body>
</html>